/****

    activequant - activestocks.eu

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along
    with this program; if not, write to the Free Software Foundation, Inc.,
    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

	
	contact  : contact@activestocks.eu
    homepage : http://www.activestocks.eu

****/
package org.activequant.dao;

import java.util.List;

import org.activequant.core.domainmodel.InstrumentSpecification;
import org.activequant.core.domainmodel.index.IndexComponent;
import org.activequant.core.types.TimeStamp;


/**
 * Regular CRUD functionality for index component, plus useful finders.<br>
 * An interface. Extends the IDaoSupport&lt;IndexComponent&gt; interface. Defines the following method:
 * <ul>
 * <li>List&lt;IndexComponent&gt; findComponentsByIndex(InstrumentSpecification spec, TimeStamp byThisTime);</li>
 * </ul>
 * <br>
 * <b>History:</b><br>
 *  - [10.08.2008] Created (Wessel de Roode)<br>
 *
 *  @author Wessel de Roode
 */
public interface IIndexComponentDao extends IDaoSupport<IndexComponent> {

	/**
	 * Locates all components (InstrumentSpecifications) belonging to one index
	 * <p>
	 * This finder locates most current composition relative to the given point in time.
	 * 
	 * @param spec The InstrumentSpecification of the index
	 * @param byThisTime point in time we are interested in.
	 * 
	 * @return Set of IndexComponents object, or null if none found.
	 */
	List<IndexComponent> findComponentsByIndex(InstrumentSpecification spec, TimeStamp byThisTime);

}
